<template>
    <div v-loading="loading" style="width: 100%;">
         <SavePage :title="form.number">
            <div slot="title">
                <span class="text">创建人：{{ form.createUserName }}</span>
                <span class="text">创建时间：{{ form.createTime }}</span>
            </div>
            <template slot="body">
                <el-row :gutter="24">
                    <el-col :span="8" class="item">
                        <span class="label">标题：</span>
                        <span>{{ form.title }}</span>
                    </el-col>
                    <el-col :span="8" class="item">
                        <span class="label">作业范围：</span>
                        <span>{{ form.constructRange }}</span>
                    </el-col>
                    <el-col :span="8" class="item">
                        <span class="label">实施对象：</span>
                        <span>{{ form.object }}</span>
                    </el-col>
                    <el-col :span="24" class="item">
                        <span class="label">内容：</span>
                        <span>{{ form.content }}</span>
                    </el-col>
                </el-row>
            </template>
         </SavePage>
    </div>
</template>

<script>
import { StandartModel } from '@/models' 

export default {
    name: 'StandardDetail',
    data() {
        return {
            model: new StandartModel(),
            form: {},
            id: null,
            loading: true
        }
    },
    created() {
        this.getQuery()
        this.id && this.getDetail()
    },
    methods: {
        goBack() {
            this.$router.go(-1)
        },
        getQuery() {
            this.id = this.$route.query.id
        },
        getDetail() {
            this.model.detail({ id: this.id }, true).then(res => {
                this.form = res
            }).finally(() => {
                this.loading = false
            })
        }
    }
}
</script>

<style lang="scss" scoped>

</style>
